<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增诊疗单')"/>
    <th:block th:include="include :: select2-css" />

</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-ncZhenliaoLogs-add">
        <!--药品ID-->
        <input id="treeId" name="treeId" type="hidden" value="1"/>
        <input id="drugId" name="drugId" type="hidden" value="1"/>
        <div class="form-group" hidden="hidden">
            <label class="col-sm-3 control-label">诊疗类型</label>
            <div class="col-sm-8">
                <input id="zlType" name="zlType" value="1" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group" hidden="hidden">
            <label class="col-sm-3 control-label">诊疗状态：</label>
            <div class="col-sm-8">
                <input id="zlStatus" name="zlStatus" value="5" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">耳号：</label>
            <div class="col-sm-8">
                <select id="cowCode" name="cowCode" class="form-control select2-multiple" >
                    <option th:each="cow:${cows}" th:value="${cow}" th:text="${cow}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">圈舍号：</label>
            <div class="col-sm-8">
                <select name="roomNum" class="form-control m-b" th:with="type=${@dict.getType('cow_juanshe_num')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <!--<div class="form-group">
            <label class="col-sm-3 control-label">日龄：</label>
            <div class="col-sm-8">
                <input id="ageDays" name="ageDays"   class="form-control" type="text">
            </div>
        </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label"> 发病次数：</label>
            <div class="col-sm-8">
                <input id="illMuns" name="illMuns"  type="number"  class="form-control" required >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">症状：</label>
            <div class="col-sm-8">
                <input id="symptom" name="symptom"  class="form-control" type="text">
            </div>
        </div>
          <div class="form-group">
                <label class="col-sm-3 control-label">推送人：</label>
                <div class="col-sm-8">
                    <select id="reportUser" name="reportUser" class="form-control select2-multiple">
                        <option th:each="user:${users}" th:value="${user.userId}" th:text="${user.loginName}"></option>
                    </select>
                </div>
            </div>
        <!-- <div class="form-group">
             <label class="col-sm-3 control-label">诊疗人员：</label>
             <div class="col-sm-8">
                 <select id="zlUser" name="zlUser" class="form-control select2-multiple" multiple>
                     <option th:each="user:${users}" th:value="${user.userId}" th:text="${user.loginName}"></option>
                 </select>
             </div>
         </div>-->
        <!--<div class="form-group">
            <label class="col-sm-3 control-label">药品名称：</label>
            <div class="col-sm-8">
                <select id="drugId" name="drugId" class="form-control select2-multiple" multiple>
                    <option th:each="ncDrug:${ncDrugs}" th:value="${ncDrug.drugId}" th:text="${ncDrug.drugName}"></option>
                </select>
            </div>
        </div>-->
        <!--    <div class="form-group">`
                <label class="col-sm-3 control-label">药品名称：</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input class="form-control" type="text" onclick="selectYaoTree()" id="treeName" readonly="true"  name="drugName" />
                        <span class="input-group-addon"><i class="fa fa-search"></i></span>
                    </div>
                </div>
            </div>-->
        <!--  <div class="form-group">
          <label class="col-sm-3 control-label">药品方法：</label>
          <div class="col-sm-8">
              <select name="drugMethod" class="form-control m-b" th:with="type=${@dict.getType('animalExecuteType')}">
                  <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
              </select>
          </div>
      </div>
          <div class="form-group">
              <label class="col-sm-3 control-label">剂量：</label>
              <div class="col-sm-8">
                  <input id="drugAmount" name="drugAmount"   class="form-control" type="number">
              </div>
          </div>
          <div class="form-group">
              <label class="col-sm-3 control-label">单位：</label>
              <div class="col-sm-8">
                  <select name="unit" class="form-control m-b" th:with="type=${@dict.getType('unitType')}">
                      <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"></option>
                  </select>
              </div>
          </div>-->
        <!-- <div class="form-group">
             <label class="col-sm-3 control-label">诊疗结果：</label>
             <div class="col-sm-8">
                 <input id="zlResult" name="zlResult"  class="form-control" type="text">
             </div>
         </div>
         <div class="form-group">
             <label class="col-sm-3 control-label">诊疗时间：</label>
             <div class="col-sm-8">
                 <input id="zlTime" data-format="yyyy-MM-dd" name="zlTime" required
                        th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="form-control"
                        type="text" th:class="time-input">
             </div>
         </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea rows="4" name="remark" class="form-control" type="text"></textarea>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
    var prefix = ctx + "system/ncZhenliaoLogs/cow"
    $("#form-ncZhenliaoLogs-add").validate({
        rules: {
            illMuns: {
                required: true,
                digits: true
            }
        },
        messages: {
            illMuns: "发病次数必须为正整数",
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/addZhenLiao", $('#form-ncZhenliaoLogs-add').serialize());
        }
    }



</script>
</body>
</html>
